<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui">
<h:head>
	<title>系统用户注册</title>
</h:head>
<ui:param name="bean" value="#{sysUserRegisterAction}" />
<h:body>
	<center>
		<h:form id="registerForm">
			<p:messages id="messages" showDetail="true" life="10000"/>	
			<p:panel header="系统用户注册"	style="text-align:center;">
				<h:panelGrid id="registerPanel" columns="2" cellpadding="5" style="margin: 0 auto;">
					<p:outputLabel value="用户名*" style="text-align:right"/>
					<p:inputText size="32" id="username" value="#{bean.user.username}" required="true" style="text-align:left"></p:inputText>					
					<p:outputLabel for="pwd1" value="输入密码" style="text-align:right"/>
					<p:password size="32" id="pwd1" value="#{bean.user.password}" match="pwd2" label="输入密码" 
						feedback="true" required="true" style="text-align:left"/>
					<p:outputLabel for="pwd2" value="重复密码" style="text-align:right"/>
					<p:password size="32" id="pwd2" value="#{bean.user.password}" label="重复密码"
						feedback="true" required="true" style="text-align:left"/>

                    <p:outputLabel value="公钥" style="text-align:right"/>
                    <p:inputText size="32" id="sign" value="#{bean.user.sign}" required="false" style="text-align:left"></p:inputText>

                    <p:outputLabel value="部门" style="text-align:right"/>
					<p:inputText size="32" id="department" value="#{bean.user.department}" required="false" style="text-align:left"></p:inputText>
					<p:outputLabel value="描述" style="text-align:right"/>
					<p:inputText size="32" id="description" value="#{bean.user.description}" required="false" style="text-align:left"></p:inputText>			
				</h:panelGrid>
				<br/>
				<p:commandButton action="#{bean.register()}" value="注册"	update="registerForm" ajax="true"></p:commandButton>
			</p:panel>
		</h:form>
	</center>
</h:body>
</html>